package com.codeoss.framework.view.model;

import java.util.ArrayList;
import java.util.List;

public class HierarchyData {
	private String id;
	private String name;
	private String icon;
	private boolean checked;
	private boolean open=false;
	private List<HierarchyData> children;
	private Object data;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public boolean isChecked() {
		return checked;
	}
	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	public boolean isOpen() {
		return open;
	}
	public void setOpen(boolean open) {
		this.open = open;
	}

	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public List<HierarchyData> getChildren() {
		return children;
	}
	public void setChildren(List<HierarchyData> children) {
		this.children = children;
	}
	
	public void addChild(HierarchyData hierarchyData) {
		if(children==null) {
			children=new ArrayList<HierarchyData>();
		}
		children.add(hierarchyData);
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
}
